/*
 Navicat MySQL Dump SQL

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80036 (8.0.36)
 Source Host           : localhost:3306
 Source Schema         : food_cn

 Target Server Type    : MySQL
 Target Server Version : 80036 (8.0.36)
 File Encoding         : 65001

 Date: 28/07/2024 23:46:08
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for {prefix}ad
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}ad`;
CREATE TABLE `{prefix}ad` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(200) NOT NULL DEFAULT '' COMMENT '标题',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态 1启用 2禁用',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `position_id` int unsigned NOT NULL COMMENT '推广位置',
  `image` varchar(500) NOT NULL COMMENT '图片',
  `is_delete` tinyint NOT NULL DEFAULT '1' COMMENT '删除状态',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '链接',
  `desc` varchar(500) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_ad_position1_idx` (`position_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='推广';

-- ----------------------------
-- Records of {prefix}ad
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}ad_position
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}ad_position`;
CREATE TABLE `{prefix}ad_position` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 1启用 2禁用',
  `is_delete` tinyint NOT NULL DEFAULT '1' COMMENT '删除状态',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='推广位置';

-- ----------------------------
-- Records of {prefix}ad_position
-- ----------------------------

-- ----------------------------
-- Table structure for {prefix}attachment
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}attachment`;
CREATE TABLE `{prefix}attachment` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(45) NOT NULL DEFAULT '' COMMENT '标题',
  `url` varchar(200) NOT NULL DEFAULT '' COMMENT '图片地址',
  `url_md5` char(32) NOT NULL DEFAULT '' COMMENT '图片地址md5值',
  `relation_id` int unsigned NOT NULL DEFAULT '0' COMMENT '关联d',
  `relation_type` varchar(10) NOT NULL DEFAULT '' COMMENT '关联类型 ad category article',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '删除标识',
  `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `key_url_md5` (`url_md5`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='附件';

-- ----------------------------
-- Records of {prefix}attachment
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}attribute
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}attribute`;
CREATE TABLE `{prefix}attribute` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '属性集合名称',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '属性集合状态1启用 2禁用',
  `is_sales` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否是销售属性1是 2不是',
  `attribute_type` tinyint NOT NULL COMMENT '属性类型1普通属性 2属性图片',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '删除标识1未删除 2已删除',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `key_category_id` (`is_sales`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='属性';

-- ----------------------------
-- Records of {prefix}attribute
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}attribute_value
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}attribute_value`;
CREATE TABLE `{prefix}attribute_value` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '属性值说明',
  `attribute_value` varchar(255) NOT NULL DEFAULT '' COMMENT '属性值',
  `attribute_id` int unsigned NOT NULL DEFAULT '0' COMMENT '属性id',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '删除标识1未删除 2已删除',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `key_attribute_id` (`attribute_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='属性值';

-- ----------------------------
-- Records of {prefix}attribute_value
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}category
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}category`;
CREATE TABLE `{prefix}category` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `title_en` varchar(255) NOT NULL DEFAULT '' COMMENT '英文名称',
  `pid` int unsigned NOT NULL DEFAULT '0' COMMENT '父级',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 1启用 2禁用',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `meta_title` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo标题',
  `meta_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo关键词',
  `meta_description` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo描述',
  `module_id` int unsigned NOT NULL DEFAULT '0' COMMENT '模型id',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '删除标识',
  `type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '页面类型\n1 单页 2封面 3列表 4跳转',
  `is_redirect_child` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '跳转子分类',
  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '路由标识',
  `page` int unsigned NOT NULL DEFAULT '0' COMMENT '每页数量',
  `go_url` varchar(255) NOT NULL DEFAULT '' COMMENT '跳转地址',
  `default_tpl` varchar(255) NOT NULL DEFAULT '' COMMENT '封面页模板名称',
  `list_tpl` varchar(255) NOT NULL DEFAULT '' COMMENT '列表页模板名称',
  `view_tpl` varchar(255) NOT NULL DEFAULT '' COMMENT '详细页模板名称',
  `target` tinyint NOT NULL DEFAULT '1' COMMENT '打开方式1当前 2新窗口',
  `image` varchar(255) NOT NULL DEFAULT '' COMMENT '栏目图片',
  `is_relation` tinyint NOT NULL DEFAULT '2' COMMENT '是否开启文档关联 1开启关联 2关闭关联',
  `relation_attribute_count` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '关联属性数量',
  `seo_url` varchar(255) NOT NULL DEFAULT '' COMMENT '自定义url',
  `uri` varchar(255) NOT NULL DEFAULT '' COMMENT '访问uri',
  `introduce_content` varchar(1000) NOT NULL DEFAULT '' COMMENT '栏目介绍',
  `introduce_video_url` varchar(255) NOT NULL DEFAULT '' COMMENT '栏目介绍视频',
  `introduce_image` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `note` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注说明',
  `note_image` varchar(255) NOT NULL DEFAULT '' COMMENT '备注图片',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `fk_category_model1_idx` (`module_id`) USING BTREE,
  KEY `key_uri` (`uri`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='分类';

-- ----------------------------
-- Records of {prefix}category
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}config
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}config`;
CREATE TABLE `{prefix}config` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL DEFAULT '' COMMENT '名称',
  `config_group` varchar(255) NOT NULL DEFAULT '' COMMENT '配置分组',
  `config_code` varchar(45) NOT NULL DEFAULT '' COMMENT '标识',
  `config_value` varchar(1000) NOT NULL DEFAULT '' COMMENT '值',
  `field_option` varchar(1000) NOT NULL DEFAULT '' COMMENT '选项',
  `field_type` varchar(45) NOT NULL DEFAULT '' COMMENT '字段类型',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1启用 2禁用',
  `sort` int unsigned NOT NULL DEFAULT '1' COMMENT '排序',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1未删除 2已删除',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `unique_code` (`config_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='站点配置';

-- ----------------------------
-- Records of {prefix}config
-- ----------------------------
BEGIN;
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (1, '标题', 'base', 'title', '站点名称', ' ', 'input', 1, 2, 1, '2024-06-12 18:06:54', '2024-07-03 21:16:07');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (2, '站点描述', 'base', 'meta_description', '站点描述', '', 'textarea', 1, 3, 1, '2020-12-05 23:26:56', '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (3, '站点关键词', 'base', 'meta_keyword', '站点关键词', '', 'textarea', 1, 4, 1, NULL, '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (4, '邮箱', 'base', 'email', '投诉邮箱：<a href=\'mailto:test@email.com\'>test@email.com</a>', '', 'input', 1, 5, 1, NULL, '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (5, '联系地址', 'base', 'address', '联系导致', '', 'textarea', 1, 7, 1, NULL, '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (6, '联系电话', 'base', 'tel', '总机：<a href=\'tel:0755-88888888\'>0755-88888888</a>', '', 'input', 1, 6, 1, '2021-05-28 20:45:33', '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (7, '备案信息', 'base', 'icp', '<a href=\'https://beian.miit.gov.cn\' target=\'_blank\'>粤ICP备88888号-1</a>', '', 'textarea', 1, 8, 1, '2021-05-28 20:57:24', '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (8, '服务地址', 'email', 'smtp_host', '', '', 'input', 1, 1, 1, '2021-06-19 15:57:22', '2024-06-11 22:21:51');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (9, '服务端口', 'email', 'smtp_port', '', '', 'input', 1, 2, 1, '2021-06-19 21:25:57', '2024-04-23 15:51:53');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (10, '服务账号', 'email', 'smtp_user', '', '', 'input', 1, 3, 1, '2021-06-19 21:26:41', '2024-06-11 22:21:03');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (11, '服务密码', 'email', 'smtp_password', '', '', 'input', 1, 4, 1, '2021-06-19 21:27:01', '2024-04-23 15:51:53');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (12, '站点logo', 'base', 'logo', '/upload/food_cn/20240628/20240628233343739.png', '', 'image', 1, 1, 1, '2021-06-20 18:13:52', '2024-06-12 18:10:36');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (13, '底部二维码', 'base', 'qrcode', '/upload/food_cn/20240617/20240617172738854.jpg', '', 'image', 1, 10, 1, '2021-09-21 16:26:00', '2024-04-23 15:51:52');
INSERT INTO `{prefix}config` (`id`, `name`, `config_group`, `config_code`, `config_value`, `field_option`, `field_type`, `status`, `sort`, `is_delete`, `created_at`, `updated_at`) VALUES (14, '版权信息', 'base', 'copyright', '2003-2022 &copy; Copyright <a href=\"index.html\">测试</a> &nbsp; &nbsp;', '', 'textarea', 1, 9, 1, '2022-08-17 01:23:37', '2024-04-23 15:51:52');
COMMIT;

-- ----------------------------
-- Table structure for {prefix}feedback_field
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}feedback_field`;
CREATE TABLE `{prefix}feedback_field` (
  `id` int NOT NULL AUTO_INCREMENT,
  `form_id` int NOT NULL DEFAULT '0' COMMENT '关联外键',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '字段名称',
  `code` varchar(45) NOT NULL DEFAULT '' COMMENT '字段code',
  `field_type` varchar(45) NOT NULL DEFAULT '' COMMENT '字段类型',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '字段状态 1启用 2禁用',
  `show_list` int unsigned NOT NULL DEFAULT '0' COMMENT '显示在列表 1显示 2隐藏',
  `is_require` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '必填,1不是必填,2必填',
  `is_system` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1 系统 2自定义',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1未删除 2已删除',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `unique_form_id_code` (`form_id`,`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='自定义表单字段';

-- ----------------------------
-- Records of {prefix}feedback_field
-- ----------------------------

-- ----------------------------
-- Table structure for {prefix}feedback_form
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}feedback_form`;
CREATE TABLE `{prefix}feedback_form` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '表单名称',
  `form_code` varchar(45) NOT NULL DEFAULT '' COMMENT '表单code',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '表单状态1启用 2禁用',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1未删除 2已删除',
  `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `unique_code` (`form_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='自定义表单';

-- ----------------------------
-- Records of {prefix}feedback_form
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}field
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}field`;
CREATE TABLE `{prefix}field` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `module_id` int unsigned NOT NULL,
  `name` varchar(45) NOT NULL DEFAULT '' COMMENT '名称',
  `code` varchar(45) NOT NULL DEFAULT '' COMMENT '标识',
  `field_type` varchar(45) NOT NULL DEFAULT '' COMMENT '类型，1 varchar文本 2 editor富文本 3 radio单选 4 mutiple复选 5 file文件上传',
  `field_option` varchar(500) NOT NULL DEFAULT '' COMMENT '选择项',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 1启用 2禁用',
  `show_list` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '显示在列表,1不显示 2显示',
  `is_require` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '必填,1不是必填,2必填',
  `is_system` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1 系统 2自定义',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1未删除 2已删除',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `unique_module_id_code` (`module_id`,`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='字段';

-- ----------------------------
-- Records of {prefix}field
-- ----------------------------


-- ----------------------------
-- Table structure for {prefix}flag
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}flag`;
CREATE TABLE `{prefix}flag` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `code` varchar(100) NOT NULL DEFAULT '' COMMENT '唯一标识',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态，1启用，2 禁用',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '1未删除 2已删除',
  `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uinque_code` (`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='文档标识';

-- ----------------------------
-- Records of {prefix}flag
-- ----------------------------
BEGIN;
INSERT INTO `{prefix}flag` (`id`, `name`, `code`, `status`, `is_delete`, `created_at`, `updated_at`) VALUES (1, '推荐', 'recommend', 1, 1, '2021-10-11 14:46:30', '2024-06-30 19:51:59');
INSERT INTO `{prefix}flag` (`id`, `name`, `code`, `status`, `is_delete`, `created_at`, `updated_at`) VALUES (2, '关联', 'hot', 1, 1, '2021-10-11 14:46:51', '2021-10-11 14:46:51');
INSERT INTO `{prefix}flag` (`id`, `name`, `code`, `status`, `is_delete`, `created_at`, `updated_at`) VALUES (3, '图文', 'picture', 1, 1, '2021-10-11 14:47:01', '2021-10-11 14:48:15');
COMMIT;

-- ----------------------------
-- Table structure for {prefix}module
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}module`;
CREATE TABLE `{prefix}module` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL DEFAULT '' COMMENT '名称',
  `code` varchar(45) NOT NULL DEFAULT '' COMMENT '标识',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 1启用 2禁用',
  `is_delete` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1 未删除 2 已删除',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `unique_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='模型';

-- ----------------------------
-- Records of {prefix}module
-- ----------------------------

-- ----------------------------
-- Table structure for {prefix}relation_attribute_category
-- ----------------------------
DROP TABLE IF EXISTS `{prefix}relation_attribute_category`;
CREATE TABLE `{prefix}relation_attribute_category` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `attribute_id` int unsigned NOT NULL DEFAULT '0' COMMENT '属性ID',
  `category_id` int unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `is_delete` tinyint NOT NULL DEFAULT '1' COMMENT '删除状态',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `key_attribute_id_category_id` (`attribute_id`,`category_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='属性和栏目关系';

-- ----------------------------
-- Records of {prefix}relation_attribute_category
-- ----------------------------


SET FOREIGN_KEY_CHECKS = 1;
